/**
 * 
 */
package edu.netjava.LinkList;

/**
 * @author tan 
 *    a node 
 *
 */
public class Node {
	
	private String data ;
	private Node next ;
	
	/**
	 * @return the data
	 */
	public Node(){
		 data = new String();
		 next = null ;
	}
	
	
	public String getData() {
		return data;
	}
	/**
	 * @param data the data to set
	 */
	public void setData(String data) {
		this.data = data;
	}
	/**
	 * @return the next
	 */
	public Node getNext() {
		return next;
	}
	/**
	 * @param next the next to set
	 */
	public void setNext(Node next) {
		this.next = next;
	}
	
	
	/**
	 * @return
	 * @see java.lang.Object#toString()
	 */
	public String toString() {
		return data.toString();
	}

}
